package io.renren.modules.sp.dao;

import io.renren.common.dao.BaseDao;
import io.renren.modules.sp.dto.SpMatchAreaLimitDTO;
import io.renren.modules.sp.entity.SpMatchAreaLimitEntity;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
* 赛事省份人数限制
*
* @author whc 1@1.com
* @since 3.0 2025-01-22
*/
@Mapper
public interface SpMatchAreaLimitDao extends BaseDao<SpMatchAreaLimitEntity> {
    IPage<SpMatchAreaLimitEntity> selectPageVo(Page page, @Param(Constants.WRAPPER) QueryWrapper<SpMatchAreaLimitDTO> wrapper);
    Integer queryUserNum(@Param("matchItemId") Integer matchItemId);
    List<Map<String, Object>> queryMatchAreaLimit(@Param("matchId") Integer matchId, @Param("matchItemId") String matchItemId);
    List<SpMatchAreaLimitEntity> queryBy(@Param("matchId") Integer matchId, @Param("matchItemId") Integer matchItemId);
    Integer signUserCount(@Param("matchItemId") Integer matchItemId, @Param("province")String province);
    List<SpMatchAreaLimitEntity> findByMatchId(@Param("matchId") Integer matchId);
    List<String> headerList(@Param("matchId") Integer matchId);
    List<String> queryProvince();

}
